import java.util.ArrayList;

/**
 * Created with IntelliJ IDEA.
 * User: thkim
 * Date: 12. 7. 10
 * Time: 오후 11:46
 * To change this template use File | Settings | File Templates.
 */
public class BookShelf implements Aggregate<Book>{
    @Override
    public BookIterator getIterator() {
        return new BookIterator(this);
    }

    private ArrayList<Book> books = new ArrayList<Book>();

    public void AddBook(Book book)
    {
        books.add(book);
    }

    public int getCount()
    {
        return books.size();
    }

    public Book getBook(int index)
    {
        return books.get(index);
    }
}
